﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;

namespace Utilities
{
    public class SessionManager
    {
        public static String LOGGED_IN_USER_ID
        {
            get
            {
                try
                {
                    if (HttpContext.Current.Session["LOGGED_IN_USER_ID"] != null)
                        return HttpContext.Current.Session["LOGGED_IN_USER_ID"].ToString();
                    else
                        return String.Empty;
                }
                catch
                {
                    return String.Empty;
                }
            }
            set
            {
                HttpContext.Current.Session["LOGGED_IN_USER_ID"] = value;
            }
        }

        public static String LOGGED_IN_USER_NAME
        {
            get
            {
                try
                {
                    if (HttpContext.Current.Session["LOGGED_IN_USER_NAME"] != null)
                        return HttpContext.Current.Session["LOGGED_IN_USER_NAME"].ToString();
                    else
                        return String.Empty;
                }
                catch
                {
                    return String.Empty;
                }
            }
            set
            {
                HttpContext.Current.Session["LOGGED_IN_USER_NAME"] = value;
            }
        }

        public static String BlogName
        {
            get
            {
                try
                {
                    if (HttpContext.Current.Session["_BlogName"] != null)
                        return HttpContext.Current.Session["_BlogName"].ToString();
                    else
                        return String.Empty;
                }
                catch
                {
                    return String.Empty;
                }
            }
            set
            {
                HttpContext.Current.Session["_BlogName"] = value;
            }
        }
    }
}
